/**
 * 
 */
package org.rado.chessbatard.board;

import java.io.Serializable;

import org.rado.chessbastard.board.exceptions.InvalidBordSquareException;
import org.rado.chessbastard.board.exceptions.InvalidPieceActionException;
import org.rado.chessbastard.board.exceptions.PieceActionException;
import org.rado.chessbastard.board.objects.IBoardSquare;
import org.rado.chessbastard.board.objects.actions.IPieceAction;
import org.rado.chessbastard.board.objects.pieces.IChessPiece;
 

/**
 * @author rado
 *
 */
public interface IChessBoard extends Serializable{
	/**
	 * get the board represented as a 8x8 array
	 * 
	 * 
	 * @return IChessPiece
	 */
	public IChessPiece[][] getBord();
	/**
	 * Returns a clone of the Piece located at the specified location.
	 * If there is no IChessPiece there, null is returned.
	 * 
	 * @param location
	 * @return
	 * @throws InvalidBordSquareException 
	 */
	IChessPiece getPieceAt(IBoardSquare location) throws InvalidBordSquareException;
	
	/**
	 * 
	 * @param action
	 * @throws InvalidPieceActionException
	 * @throws PieceActionException 
	 */
	void executeAction(IPieceAction action) throws InvalidPieceActionException, PieceActionException;
	
}
